Show the code
library(tidyverse)
data <- data.frame(n = rep(seq(1, 10, 1), 3),
alpha = c(rep(0.05, 10), rep(0.01, 10), rep(0.001, 10))) %>%
mutate(p = 1-(1-alpha)^n) %>%
mutate(`P value`=case_when(
alpha==0.05~"P value ≤ 0.05 (dOFV ≥ 3.84)",
alpha==0.01~"P value ≤ 0.01 (dOFV ≥ 6.63)",
alpha==0.001~"P value ≤ 0.001 (dOFV ≥ 10.8)"))
ggplot(data, aes(x=n, y=p, group=`P value`, color=`P value`))+
geom_point()+geom_line()+
xlab("Number of multiple testing")+
ylab("Probability of ≥1 false positive")+
theme_bw()